package com.easylinkin.linkappapi.linkage.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.easylinkin.linkappapi.deviceparm.entity.DeviceParm;
import com.easylinkin.linkappapi.deviceservice.entity.DeviceServices;
import com.easylinkin.linkappapi.deviceunit.entity.DeviceUnit;

import java.io.Serializable;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 智能规则联动配置关联下行设备表
 * </p>
 *
 * @author TongJie
 * @since 2020-05-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("linkage_config_relate_service_parm")
@ApiModel("智能规则联动配置关联下行设备表")
public class LinkageConfigRelateServiceParm extends Model<LinkageConfigRelateServiceParm> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId("id")
    @ApiModelProperty(value = "主键ID", example = "")
    private String id;

    /**
     * 执行器id
     */
    @TableField("rule_execution_id")
    @ApiModelProperty(value = "执行器id", example = "")
    private String ruleExecutionId;

    /**
     * 组序号
     */
    @TableField("group_number")
    @ApiModelProperty(value = "组序号", example = "")
    private Integer groupNumber;

    /**
     * 设备型号id
     */
    @TableField("device_unit_id")
    @ApiModelProperty(value = "设备型号id", example = "")
    private String deviceUnitId;

    /**
     * 新的设备型号id
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "新的设备型号id", example = "")
    private String newDeviceUnitId;
    /**
     * 设备型号
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "设备型号", example = "")
    private DeviceUnit deviceUnit;

    /**
     * 设备服务id
     */
    @TableField("device_service_id")
    @ApiModelProperty(value = "设备服务id", example = "")
    private String deviceServiceId;

    /**
     * 新设备服务id
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "新设备服务id", example = "")
    private String newDeviceServiceId;

    /**
     *
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "设备服务集合", example = "")
    private List<DeviceServices> deviceServiceList;


    /**
     * 设备参数id
     */
    @TableField("device_parm_id")
    @ApiModelProperty(value = "设备参数id", example = "")
    private String deviceParmId;

    /**
     * 新设备参数id
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "新设备参数id", example = "")
    private String newDeviceParmId;


    /**
     * 设备服务的 identifier
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "设备服务的identifier", example = "")
    private String serviceIdentifier;

    /**
     * 设备参数的 唯一标志
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "设备参数的唯一标志", example = "")
    private String identifier;

    /**
     * 设备服务 参数
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "设备服务的参数", example = "")
    private DeviceParm deviceParm;

    /**
     * 设备服务 参数
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "", example = "")
    private List<DeviceParm> deviceParmList;

    /**
     * 参数值
     */
    @TableField("parm_value")
    @ApiModelProperty(value = "参数值", example = "")
    private String parmValue;


    /**
     * 数组序号
     */
    @TableField("array_index")
    @ApiModelProperty(value = "数组序号", example = "0")
    private Integer arrayIndex;

    /**
     * 父级id
     */
    @TableField("parent_Id")
    @ApiModelProperty(value = "父级id", example = "")
    private String parentId;

    @TableField(exist = false)
    @ApiModelProperty(value = "单位", example = "")
    private String unit;

    @TableField(exist = false)
    @ApiModelProperty(value = "规范", example = "")
    private String specs;
    /**
     * 参数名称
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "参数名称", example = "")
    private String name;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
